package cn.javabb.core.redis;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;

import java.time.Duration;

/**
 * redis属性配置文件
 *
 */
@Configuration
@ConfigurationProperties(prefix = "spring.redis")
@Data
@Order(-1)
public class RedisProperties {
    private Integer database;
    private String host;
    private Integer port;
    private String password;
    private Duration timeout;
    public void RedisProperties(){
        System.out.println("加载了RedisProperties");
    }
    /**
     * 默认30天 = 2592000s
     */
    private Integer expire = 2592000;
}
